FONTFILT

Section: User Commands (1)
Updated: May, 1991
Index Return to Main Contents
 

NAME

fontfilt - font filter for cawf  

SYNOPSIS

fontfilt [ -c config ] [ -d device ] [ -f font ] [ -h ] [ file(s) ]  

DESCRIPTION

Fontfilt enhances cawf(1) output with device-specific control sequences that select fonts and display bold and italic characters. (The cawf -fe option must be used to identify bold and italic characters.)  

OPTIONS

Fontfilt options select the configuration file, the device, the font and the input source.
-c config
specifies the name of the configuration file. (See the DEVICES AND FONTS and CONFIGURATION FILE sections for more information.)
-d device
specifies the printer output device. The default is the name of the last device in the configuration file, usually ``ansi''.
-f font
specifies the desired printer font name. The default is device specific.
-h
requests a usage information display (help) that includes a list of the devices and fonts that are supported.
file(s)
specify the paths to cawf output files.
 

DEVICES AND FONTS

The devices and fonts that fontfilt supports are defined in a configuration file. The default configuration file is named fontfilt.cf and is located in c:/sys/lib/cawf (the author's MS-DOS environment default).

The fontfilt.cf configuration file of this distribution defines the following devices and fonts. Use the -h option to see the definitions of your active configuration file. (The first font named in the following listing and in the -h display is the default for the device.)

ansi      ANSI terminal display
          (ANSI.SYS driver required for MS-DOS)
          Italic:   Underscore
          Fonts:    none
epson    dot matrix printer in Epson FX-86e/FX-800 mode
          Bold:     Double-strike
          Fonts:    none
ibmppds  IBM Personal Printer Data Stream (PPDS) protocol
          Bold:     Double-strike
          Italic:   Underline
          Fonts:    none
kxp1180  Panasonic KX-P1180 dot matrix printer in PGM mode
          Bold:     Emphasized
          Fonts:    c10        10 Characters Per Inch (CPI) Courier
                    c12        12 CPI Courier
                    bps10      10 CPI Bold PS
                    bps12      12 CPI Bold PS
                    p10        10 CPI Prestige
                    p12        12 CPI Prestige
                    ss10       10 CPI Sans Serif
                    ss12       12 CPI Sans Serif
lj3      HP LaserJet III
          Fonts:    c10        10 point, 12 Characters Per Inch (CPI)
                               Courier
                    c12ibm     12 point, 10 CPI Courier, IBM-PC
                               Symbol Set
                    lg12       12 point, 12 CPI Letter Gothic
vgamono  VGA monochrome monitor for MS-DOS
          (ANSI.SYS driver required for MS-DOS)
          Italic:   Reverse-video
          Fonts:    none
 

EXAMPLES

The cawf invocation must use its -fe option. The following example selects the 12 CPI Prestige font on a Panasonic KX-P1180 printer.
cawf -fe -man cawf.1 | fontfilt -d kxp1180 -f p12

The following example selects the 12 CPI Letter Gothic font on an HP LaserJet III printer.

cawf -fe -man cawf.1 > lj3.tmp
fontfilt -dlj3 -flg12 lj3.tmp > lpt1:
 

CONFIGURATION FILE

Fontfilt searches for its configuration file in c:/sys/lib/cawf (the author's MS-DOS environment default). This default can be overridden by the CAWFLIB environment variable, or changed in the source code.

The configuration file has a simple format that conforms to the following rules.

1.
Lines that begin with a pound sign (`#') a space or are zero in length are ignored.
2.
Lines that begin with an alphabetic character name a device.
3.
Device lines may be followed by lines that define the device escape control sequences for bold, italic and Roman characters, or font definitions. These definition lines must begin with a TAB, followed by a single character defining the type of definition, followed by an equal sign (`=').
4.
The bold, italic and Roman definition types are `b', `i' and `r'. An equal sign follows the single type character, and the device escape control sequence follows it. (See rule 6 for a description of the encoding of the control sequence.)
5.
The font definition type is `f'. It's followed by an equal sign, the name of the font (it must not include an equal sign); another equal sign, terminating the font name; and after the second equal sign, the device control sequence to make the font active. (See rule 6 for a description of the encoding of the control sequence.)
The first font definition for a device is assumed to be the default font for the device.
6.
All characters following the equal sign up to the terminal end-of-line character are part of an escape control sequence. The sequence may contain any printable ASCII characters. Non-printable characters can be encoded in octal with the `\nnn' form, or in hexadecimal with the `\xnn' form. The special code, `\E' or `\e' represents the ESC control character, octal 033 (hexadecimal 1b).

Here's an example showing the definition for the HP LaserJet III. All of its non-printable characters are ESC's; the first is coded with the octal form (`\033'); the second, with `\E'; the rest, with the hexadecimal form `\x1b'. # HP LaserJet III lj3           b=\033(s7B
          i=\E(s1S
          r=\x1b(s0B\x1b(s0S
          f=c10=2ibm=2.0v0s0b3T
          f=lg12=), cawf(1) and nroff(1).
 

DIAGNOSTICS

Diagnostic messages are delivered to the standard error file.  

HISTORY

Fontfilt was written by Vic Abell, <abe@mace.cc.purdue.edu>. Chet Creider <creider@csd.uwo.ca> had the idea for it and provided some device-specific prototypes, adapted from the ro work of Ted A. Campbell. (Campbell's ro is based on ROFF4.)


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
DEVICES AND FONTS
EXAMPLES
CONFIGURATION FILE
DIAGNOSTICS
HISTORY

This document was created by man2html, using the manual pages.
Time: 16:12:36 GMT, September 10, 2022